package com.example.lib_net.interceptor

import com.example.lib_storage.AuthMMKV
import okhttp3.Interceptor
import okhttp3.Response

class TokenInterceptor : Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
//        Content-Language: zh_CN
//platform: ANDROID
//source: CLUB_APP
//Authorization:
//meid: ai0d75be6be8db1f85ef1768a0157815ed
//version: 1.1.5
//phoneModel: google_sdk_gphone64_x86_64
        val request = chain.request().newBuilder()
        request.addHeader("Content-Language","zh_CN")
        request.addHeader("platform","ANDROID")
        request.addHeader("source","CLUB_APP")
        request.addHeader("Authorization", AuthMMKV.accessToken)
        request.addHeader("meid","ai0d75be6be8db1f85ef1768a0157815ed")
        request.addHeader("version","1.1.5")
        request.addHeader("phoneModel","google_sdk_gphone64_x86_64")
        return chain.proceed(request.build())
    }
}